/**
 * Created by Administrator on 2017/7/27.
 */

(function (w) {

    //外网服务器
    // var apiHost='http://39.106.4.218';
    //内网服务器
    //var apiHost='http://192.168.199.217';
    //外网地址
    var apiHost='http://dk.huifakeji.com';
    //配置项
    w.C={};
    //域名
    C.host=apiHost+'/hongbao/mobile/';


    //获取微信oppenId
    C.wxOppenId='http://www.rrfun.com.cn/Uc/reg';
    //是否开启打印日志
    C.debug=true;
    //是否正在维护
    C.isWeihu=false;
    //手机验证正则
    C.phoneReg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
    //邮箱验证正则
    C.emailReg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
    //安全码验证正则
    C.selfNumberReg = /^[0-9a-zA-Z]{8,16}$/;
    //发送验证码时间
    C.putCodeTime=60;


    //var token='2017091814287384479dc2fcbc776c4e34a1d9f9ad2b297b9d';
    //token
    //localStorage.setItem('token','201801191013855032e70c8b5e0a914d448c4e7eeaaa35d489');
    C.token = localStorage.getItem('token');
    //经度
    C.jingdu = localStorage.getItem('jingdu');
    //纬度
    C.weidu = localStorage.getItem('weidu');
    //城市编码
    //C.cityCode = localStorage.getItem('cityCode');
    C.cityCode = '110000';
    //固定配置
    C.phone='15588152730';
    C.pwd='12345678';

    //强制刷新当前页面
    C.version=Math.random();

    //接口
    C.interface = {
        //首页
        home:'index/index',
        //首页下的二级页面
        category:'index/categoryStore',
        //首页下的商家查看更多
        homeShopMore:'index/more',
        //首页全部分类
        allCategory:'index/allCategory',
        //二级菜单下切换分类
        cateChange:'index/storeByCategoryId',
        //二级菜单下的商品列表切换
        erjiCateChange:'index/storeBySonCategoryId',
        //查看店铺详情
        catDetail:'index/store1',
        // 帮助说明
        help:'help/help',
        //搜搜
        searchStore:'index/searchStore',
         //登录
        loginIn:'/login/in',
         //转一下列表
        giftLists:'userAccount/giftLists',
        // 抽奖
        choujiang:'userAccount/choujiang',
        // 收藏
        add:'collect/add',
        // 更新领奖人地址
        giftAdressUpdata:'userAccount/UpdateWinner',
        // 查询快递信息
        giftExpress:'userAccount/queryWinnerGift',
        //获取手机验证码
        getCode:'login/send',
        //用户通过分享的链接注册
        shareRegister:'login/reg',
        //获取分享人的头像昵称及注册码,
        getShareUserInfo:'login/queryInfo',
        //获取评价
        getEvaluate:'index/PingJiaByStore'

    };


    //组合接口地址
    for (k in C.interface){
        C.interface[k]=C.host + C.interface[k];
    }


})(window);













